package com.chouxiaozi.wechatpublic.commons.util;

import org.apache.commons.lang.math.RandomUtils;

public class RandNumUtil extends RandomUtils {
	
	public static int getInt() {
		return RandomUtils.nextInt();
	}
	
	public static int getInt(int n) {
		return RandomUtils.nextInt(n);
	}
	
	public static int getInt(int start,int end) {
		int n=-1;
		
		while (n<start||n>=end) {
			n= RandomUtils.nextInt(end);
		}
		
		return n;
	}
	
	public static long getLong(int start,int end) {
		long n=-1;
		
		while (n<start||n>=end) {
			n= RandomUtils.nextInt(end);
		}
		
		return n;
	}
	public static void main(String[] args) {
		for (int i = 0; i < 50; i++) {
			System.out.println(RandNumUtil.getInt(61,90));
		}
		
	}

}
